﻿using System;

class HalfSum
{
    static void Main()
    {
        int n = int.Parse(Console.ReadLine());

        int result1 = 0;
        int result2 = 0;

        for (int i = 0; i < n; i++)
        {
            result1 += int.Parse(Console.ReadLine());
        }
        for (int j = 0; j < n; j++)
        {
            result2 += int.Parse(Console.ReadLine());
        }

        bool equal = result1 == result2;
        int difference = Math.Abs(result1 - result2);

        if (equal)
        {
            Console.WriteLine("Yes, sum={0}", result1);
        }
        else
        {
            Console.WriteLine("No, diff={0}", difference);
        }
    }
}